import buildModuleUrl from "../../Core/buildModuleUrl.js";
import ArcGisMapServerImageryProvider from "../../Scene/ArcGisMapServerImageryProvider.js";
import createWorldImagery from "../../Scene/createWorldImagery.js";
import IonImageryProvider from "../../Scene/IonImageryProvider.js";
import IonWorldImageryStyle from "../../Scene/IonWorldImageryStyle.js";
import OpenStreetMapImageryProvider from "../../Scene/OpenStreetMapImageryProvider.js";
import WebMapTileServiceImageryProvider from "../../Scene/WebMapTileServiceImageryProvider.js";
import TileMapServiceImageryProvider from "../../Scene/TileMapServiceImageryProvider.js";
import ProviderViewModel from "../BaseLayerPicker/ProviderViewModel.js";
import QuarkGIS from "quarkgis";

/**
 * @private
 */
function createDefaultImageryProviderViewModels() {
  var providerViewModels = [];
  providerViewModels.push(
    new ProviderViewModel({
      name: "微软地图",
      iconUrl: buildModuleUrl("Widgets/Images/ImageryProviders/bingAerial.png"),
      tooltip: "",
      category: "",
      creationFunction: function () {
        return createWorldImagery({
          style: IonWorldImageryStyle.AERIAL,
        });
      },
    })
  );

  providerViewModels.push(
    new ProviderViewModel({
      name: "微软地图（标签）",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/bingAerialLabels.png"
      ),
      tooltip: "",
      category: "",
      creationFunction: function () {
        return createWorldImagery({
          style: IonWorldImageryStyle.AERIAL_WITH_LABELS,
        });
      },
    })
  );

  providerViewModels.push(
    new ProviderViewModel({
      name: "微软地图（道路）",
      iconUrl: buildModuleUrl("Widgets/Images/ImageryProviders/bingRoads.png"),
      tooltip: "",
      category: "",
      creationFunction: function () {
        return createWorldImagery({
          style: IonWorldImageryStyle.ROAD,
        });
      },
    })
  );

  providerViewModels.push(
    new ProviderViewModel({
      name: "ESRI世界图像",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/esriWorldImagery.png"
      ),
      tooltip:"",
      category: "",
      creationFunction: function () {
        return new ArcGisMapServerImageryProvider({
          url:
            "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",
          enablePickFeatures: false,
        });
      },
    })
  );

  providerViewModels.push(
    new ProviderViewModel({
      name: "ESRI世界图像（街道）",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/esriWorldStreetMap.png"
      ),
      tooltip:"",
      category: "",
      creationFunction: function () {
        return new ArcGisMapServerImageryProvider({
          url:
            "https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",
          enablePickFeatures: false,
        });
      },
    })
  );

  providerViewModels.push(
    new ProviderViewModel({
      name: "ESRI国家地理",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/esriNationalGeographic.png"
      ),
      tooltip:"",
      category: "",
      creationFunction: function () {
        return new ArcGisMapServerImageryProvider({
          url:
            "https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",
          enablePickFeatures: false,
        });
      },
    })
  );

  providerViewModels.push(
    new ProviderViewModel({
      name: "微软共享地图",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/openStreetMap.png"
      ),
      tooltip:"",
      category: "",
      creationFunction: function () {
        return new OpenStreetMapImageryProvider({
          url: "https://a.tile.openstreetmap.org/",
        });
      },
    })
  );

  /*providerViewModels.push(
    new ProviderViewModel({
      name: "Stamen Watercolor",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/stamenWatercolor.png"
      ),
      tooltip:
        "Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect \
area washes and organic edges over a paper texture to add warm pop to any map.\nhttp://maps.stamen.com",
      category: "Other",
      creationFunction: function () {
        return new OpenStreetMapImageryProvider({
          url: "https://stamen-tiles.a.ssl.fastly.net/watercolor/",
          credit:
            "Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.",
        });
      },
    })
  );*/

  /*providerViewModels.push(
    new ProviderViewModel({
      name: "Stamen Toner",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/stamenToner.png"
      ),
      tooltip: "A high contrast black and white map.\nhttp://maps.stamen.com",
      category: "Other",
      creationFunction: function () {
        return new OpenStreetMapImageryProvider({
          url: "https://stamen-tiles.a.ssl.fastly.net/toner/",
          credit:
            "Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.",
        });
      },
    })
  );*/

  /*providerViewModels.push(
    new ProviderViewModel({
      name: "Sentinel-2",
      iconUrl: buildModuleUrl("Widgets/Images/ImageryProviders/sentinel-2.png"),
      tooltip:
        "Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",
      category: "QuarkGIS ion",
      creationFunction: function () {
        return new IonImageryProvider({ assetId: 3954 });
      },
    })
  );*/

  /*providerViewModels.push(
    new ProviderViewModel({
      name: "Blue Marble",
      iconUrl: buildModuleUrl("Widgets/Images/ImageryProviders/blueMarble.png"),
      tooltip: "Blue Marble Next Generation July, 2004 imagery from NASA.",
      category: "QuarkGIS ion",
      creationFunction: function () {
        return new IonImageryProvider({ assetId: 3845 });
      },
    })
  );*/

 /* providerViewModels.push(
    new ProviderViewModel({
      name: "夜间地图",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/earthAtNight.png"
      ),
      tooltip:"",
      category: "",
      creationFunction: function () {
        return new IonImageryProvider({ assetId: 3812 });
      },
    })
  );*/

  /*providerViewModels.push(
    new ProviderViewModel({
      name: "高德影像",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/gaode_vec.png"
      ),
      tooltip:"",
      category: "影像",
      creationFunction: function () {
        var esri = WebMapTileServiceImageryProvider({
          layer:'tdtVecBasicLayer',
          style:'default',
          tileMatrixSetID:'GoogleMapsCompatible',
          url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}'
        });
        return esri;
      },
    })
  );*/



  /*providerViewModels.push(
    new ProviderViewModel({
      name: "Natural Earth\u00a0II",
      iconUrl: buildModuleUrl(
        "Widgets/Images/ImageryProviders/naturalEarthII.png"
      ),
      tooltip:
        "Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",
      category: "QuarkGIS ion",
      creationFunction: function () {
        return new TileMapServiceImageryProvider({
          url: buildModuleUrl("Assets/Textures/NaturalEarthII"),
        });
      },
    })
  );*/

  return providerViewModels;
}
export default createDefaultImageryProviderViewModels;
